1. Field of the Invention
The present invention relates to an electronic device and a playback control method therefor, and is suitable for application to portable digital audio players that use a flash memory, for example, as a storage medium for digital content.
2. Description of Related Art
In recent years, portable digital audio players that use, for example, a solid-state memory device such as flash memory, and record and read audio data, such as music and other audio, on and from the solid-state memory have been put to practical use (see, for example, Japanese Patent Application Publication No. 2000-311104).
In these portable digital audio players, audio data is stored on a storage medium as files. As a file management method in portable digital audio players, in general, the FAT (File Allocation Table) file system is used. In the FAT file system, a storage medium is divided into smaller regions called clusters, and data is stored in units of such clusters.
In the FAT file system, a file, depending on its size, is stored in a single cluster, or is divided and stored in a plurality of clusters. In the FAT file system, link information, which forms part of a file, is recorded in a table referred to as a FAT.
In other words, as shown in FIG. 5B, a FAT is a table of FAT entries for all clusters within a storage medium, and in each FAT entry is recorded the cluster number of the cluster that follows the present cluster, an EOF (End of File) indicating that the present cluster is the last cluster of a file, or a “0” which indicates that the present cluster is an unused cluster. In addition, in the directory of the storage medium are stored, as shown in FIG. 5A, the file names of the files stored on the storage medium, and the cluster number of the first cluster (head cluster) of each file.
Thus, in the FAT file system, by tracing the FAT entries sequentially beginning with the first cluster indicated in the directory, accessing each cluster constituting a file is made possible.
In a portable digital audio player, for purposes of going back to the beginning of a piece of music, for example, it is required that reverse playback in which music is played back backwards in time (so called REV playback) be made possible. In such a case, clusters constituting a music file are accessed in reverse order from the last cluster.
However, in the FAT file system, as mentioned above, clusters are sequentially accessed from the beginning of a file in accordance with the FAT. Therefore, in order to access clusters in reverse order during REV playback, the cluster previous to the cluster being read has to be found by following the FAT entries in the FAT from the beginning each time. As such, the bigger the file size (that is, the longer the piece of music), the longer the processing time required for reverse access becomes, and there arises a problem where reverse playback becomes slow.
In order to solve this problem, there exists a portable digital player which makes it possible to access previous clusters rapidly by recording, as shown in FIG. 5C, the cluster number of the clusters constituting a file in order (numbers assigned in this order will be referred to as indices) in a table called a cluster chain buffer that exists for each file, and reading cluster numbers by following the indices in reverse order.